﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using CommonModule;

namespace Services
{
    public interface ICustomCommand
    {
        IEnumerable<CommandDefinition> GetCommandsByRole(Roles roles);
    }

    public class CommandService
    {
        #region MyRegion
        //private static volatile CommandService instance;
        //private static object syncRoot = new object();

        //private CommandService()
        //{

        //}
        //public static CommandService Instance
        //{
        //    get
        //    {
        //        if (instance == null)
        //        {
        //            lock (syncRoot)
        //            {
        //                if (instance == null)
        //                {
        //                    instance = new CommandService();
        //                }
        //            }
        //        }
        //        return instance;
        //    }
        //} 
        #endregion

        public List<CommandDefinition> GetCommandsByRole(Roles roles)
        {
            List<CommandDefinition> CommandCollection = null;

            switch (roles)
            {
                case Roles.Admin:
                    {
                        CommandCollection = AdminCommandService.GetCommands();
                    break;
                    }
                case Roles.Manager:
                    break;
                case Roles.Engineer:
                    break;
                default:
                    break;
            }
            return CommandCollection;
        }
    }
}
